import { get, post, post_json } from '@/http/axios'
import moment from 'moment'
export default {
    namespaced:true,
    state: {
        //员工订单产品详情数据
        OrderDetailsData: [],
        //员工订单地址详情数据
        ALlDetailsData:[]
    },
    mutations: {
        SET_EMPLOYEEDATA(state, res) {
            state.OrderDetailsData = res.data.data.orderLines;
            state.ALlDetailsData=res.data.data;
            // console.log(state.ALlDetailsData)
        }
    },
    actions: {
        async getEmployeeOrderDetailsData({ commit }, payload) {
            let res =await get('/order/findById', payload);
            
            console.log(res.data.data)
            commit('SET_EMPLOYEEDATA', res);
        }
    }
}